package com.hdaccp.service.impl;

import com.hdaccp.dao.FenleiDao;
import com.hdaccp.dao.UserDao;
import com.hdaccp.entity.Fenlei;
import com.hdaccp.entity.User;
import com.hdaccp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao ;
    @Autowired
    private FenleiDao fenleiDao ;
    @Override
    public void save() {
        User user   = new User() ;
        user.setName("翱翔2");
        userDao.save(user);
        int result = 10 / 0 ;
        Fenlei fenlei = new Fenlei() ;
        fenlei.setName("t176aaaaaaaaaaa");
        fenleiDao.save(fenlei);
    }
}
